devfandomcom-20200223-history
Talk:GlobalChatJS
Not working I already installed this script in http://community.wikia.com/wiki/User:Not_real_name/global.js but does not work and the scripts I placed in http://community.wikia.com/wiki/User:Not_real_name/chat.js did not work in candy crush wiki. [[User:Not real name]] (talk) 11:00, November 6, 2016 (UTC) :You're loading ChatHacks in your global.js page, which prevents GlobalChatJS from working (see GlobalChatJS#Limitations). Try moving your ChatHacks import to your chat.js and it should work. - OneTwoThreeFall (talk) 09:29, November 7, 2016 (UTC) ::Thanks [[User:Not real name]] (talk) 21:45, November 7, 2016 (UTC) Limitations Will the fact that this script only works via links ever be fixed, or will it stay like this?—|| Grudgeholderr ||— 05:46, May 25, 2018 (UTC) :If I remember correctly, it will only work on links, but I could be wrong. --'Sophie' 06:14, May 25, 2018 (UTC) ::It's not OneTwoThreeFall's fault, it's something FANDOM is not capable of this. If someone could change that, than it's , but I guess, they wont… --'Agent Zuri Profile Message Wall Blog' 07:04, May 25, 2018 (UTC) :::Okay, thanks for the clarification!—|| Grudgeholderr ||— 07:15, May 25, 2018 (UTC) :Like Agent Zuri mentions, it's an issue of Chat itself - it doesn't run any global JS by default so we need a sort of "bridge" to get the code loaded, and clicking a link to open the chat window provides that "bridge" to load the code. :However, with the HTTPS roll-out finally starting, there might be another option: using a service worker to send a custom response when Chat is load. I'm still looking into this (so no ETA, sorry), and I'm not even sure if it's something the JS reviewers would allow, but it could possibly allow GlobalChatJS to function no matter how Chat is loaded. - OneTwoThreeFall talk 15:13, May 25, 2018 (UTC) ::I've now added an experimental service worker mode! You'll need a fairly recent browser (Firefox 44+, Chromium 45+, Safari 11.1+, Edge 17+) and the wiki must be using HTTPS. ::To try it, you'll need to add the line window.GlobalChatJS_useServiceWorker = true; above your GlobalChatJS import. With the service worker, the usual network request for the site/user chat JS will be changed to load your Community Central chat.js page too, no matter how you load Chat. ::Feel free to try it out and let me know how it works (or if it doesn't)! - OneTwoThreeFall talk 11:39, June 23, 2018 (UTC) :::Ah, thanks for the solution! It works perfectly!—|| Grudgeholderr ||— 04:38, July 7, 2018 (UTC) :::This mode is incredibly useful, & I’ve been using it for some time without any issues. Should it not be added to the main documentation? ::::I was planning on making it the default (i.e. removing the config option) once HTTPS is fully supported site-wide, so it wouldn't be inconsistent between HTTP and HTTPS wikis. That could still be a while away though, so maybe I should do it sooner… - OneTwoThreeFall talk 17:22, July 31, 2018 (UTC) :The service worker mode is now the default. It'll work on all fandom.com wikis (including non-English wikis), and on wikia.com wikis that use HTTPS (generally only English wikis). On HTTP wikia.com wikis, it'll still fall back to the old click handler mode, but they likely won't be around for too much longer. - OneTwoThreeFall talk 09:32, November 2, 2018 (UTC) GlobalChatCSS Could there be a script like this, but for CSS?— 00:05, January 4, 2020 (UTC) : It's been a while so I may be wrong, but I think CC's global.css page loads on chat already. - OneTwoThreeFall talk 06:25, January 4, 2020 (UTC) :: Oh, I didn't know that. Thanks a lot!— 08:38, January 4, 2020 (UTC)